﻿//Copyright (C) <2013>  <jonathan cleeve norton> All Rights Reserved 
//Contact jon.norton@fin-plus.co.uk website <http://www.fin-plus.co.uk/>
using System.Windows.Controls;
using FinPlusInterfaces;

namespace FinPlusCompView
{
    public partial class FinPlusWebPage : FinPlusControl
    {
        [State(Test = true)]
        public override bool IsValid { get; set; }
        private IFinPlusComp  _tabPanel, _webMenu;

        //construct
        public FinPlusWebPage(IFinPlusComp tabPanel,  IFinPlusComp webMenu)
        {
            InitializeComponent();
            _tabPanel = tabPanel;
            _webMenu = webMenu;
            menuPanel.Children.Add((UserControl)webMenu);
            tab.Children.Add((UserControl)tabPanel);
        }

        //common control interface
        public override void Dispose()
        {
            if (_webMenu != null)
                _webMenu.Dispose();
            if (_tabPanel != null)
                _tabPanel.Dispose();
        }
    }
}
